package net.comm.shequ.web.form;

import net.comm.page.PageCtr;

import org.apache.struts.action.*;

public class ShequForm extends ActionForm {

	private static final long serialVersionUID = 1L;
	private static final String KEY_SPLIT = "#,##,#,#,#";
	
	private int QryWork_sublocation;
	private int QryWork_area;
	private String QryOrderby;	//	排序字符串

	private int VillageID;	//	社区ID
	private String Village;	//	社区名称
	private String Info;	//	社区介绍
	private int Work_location;		//	所在省份
	private int Work_sublocation;	//	所在城市
	private int Work_area;	//	所在区县
	private String MapXY;	//	Google地图位置
	private String Address;	//	通讯地址
	private String PostCode;	//	邮编
	private int GroupNum;	//	部落数量
	private int MemberNum;	//	成员人数
	private String Ctime;	//	建立时间
	private int UserID;		//	创建人ID
	private String Status;	//	状态
	private String Mtime;	//	最后修改时间
	

	public ShequForm() {
		super();
		// TODO Auto-generated constructor stub
		Clear();
	}
	public void Clear() {
		
		QryWork_sublocation = 0;
		QryWork_area = 0;	
		QryOrderby = "";
		
		VillageID = 0;	//	社区ID
		Village = "";	//	社区名称
		Info = "";		//	社区介绍
		Work_location = 0;		//	所在省份
		Work_sublocation = 0;	//	所在城市
		Work_area = 0;	//	所在区县
		MapXY = "";		//	Google地图坐标
		Address = "";	//	通讯地址
		PostCode = "";	//	邮编
		GroupNum = 0;	//	部落数量
		MemberNum = 0;	//	成员人数
		Ctime = "";		//	建立时间
		UserID = 0;		//	创建人ID
		Status = "";	//	状态
		Mtime = "";		//	最后修改时间			
	}

	/**
	 * 查询当前页主键值串
	 */
	private String key = "";

	/**
	 * 查询上上页主键值串
	 */
	private String lastKey = "";
	

	/**
	 * 分页控制对象
	 */
	private PageCtr page;
	


	private String action = "";

	public PageCtr getPage() {
		return page;
	}

	public void setPage(PageCtr page) {
		this.page = page;
	}
	
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String[] array) {
		if(key != null && key.trim().length() > 0) {
			key = "";
		}
		
		StringBuffer keyBuff = new StringBuffer();
		for (int i = 0; i < array.length; i++) 
		{
			/**
			 * 防止空字符串引起的split方法异常
			 */
			if(array[i] == null || array[i].length() == 0) {
				keyBuff.append(" ");
			} else {
				keyBuff.append(array[i]);
			}
			
			keyBuff.append(KEY_SPLIT);
		}
		
		key = keyBuff.toString();		
	}
	
	/**
	 * 获取lastKey值
	 * @return
	 */
	public String[] lastKey()
	{
		if(lastKey == null || lastKey.trim().length() == 0) {
			return null;
		}
		
		return lastKey.split(KEY_SPLIT);
	}
	
	public String getLastKey() {
		return lastKey;
	}

	public void setLastKey(String lastKey) {
		this.lastKey = lastKey;
	}

	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}
	
	public static String getKEY_SPLIT() {
		return KEY_SPLIT;
	}


	public static long getSerialVersionUID() {
		return serialVersionUID;
	}
	public int getQryWork_sublocation() {
		return QryWork_sublocation;
	}
	public int getQryWork_area() {
		return QryWork_area;
	}
	public int getVillageID() {
		return VillageID;
	}
	public String getVillage() {
		return Village;
	}
	public String getInfo() {
		return Info;
	}
	public int getWork_location() {
		return Work_location;
	}
	public int getWork_sublocation() {
		return Work_sublocation;
	}
	public int getWork_area() {
		return Work_area;
	}
	public String getMapXY() {
		return MapXY;
	}
	public String getAddress() {
		return Address;
	}
	public String getPostCode() {
		return PostCode;
	}
	public int getGroupNum() {
		return GroupNum;
	}
	public int getMemberNum() {
		return MemberNum;
	}
	public String getCtime() {
		return Ctime;
	}
	public int getUserID() {
		return UserID;
	}
	public String getStatus() {
		return Status;
	}
	public String getMtime() {
		return Mtime;
	}
	public void setQryWork_sublocation(int qryWork_sublocation) {
		QryWork_sublocation = qryWork_sublocation;
	}
	public void setQryWork_area(int qryWork_area) {
		QryWork_area = qryWork_area;
	}
	public void setVillageID(int villageID) {
		VillageID = villageID;
	}
	public void setVillage(String village) {
		Village = village;
	}
	public void setInfo(String info) {
		Info = info;
	}
	public void setWork_location(int work_location) {
		Work_location = work_location;
	}
	public void setWork_sublocation(int work_sublocation) {
		Work_sublocation = work_sublocation;
	}
	public void setWork_area(int work_area) {
		Work_area = work_area;
	}
	public void setMapXY(String mapXY) {
		MapXY = mapXY;
	}
	public void setAddress(String address) {
		Address = address;
	}
	public void setPostCode(String postCode) {
		PostCode = postCode;
	}
	public void setGroupNum(int groupNum) {
		GroupNum = groupNum;
	}
	public void setMemberNum(int memberNum) {
		MemberNum = memberNum;
	}
	public void setCtime(String ctime) {
		Ctime = ctime;
	}
	public void setUserID(int userID) {
		UserID = userID;
	}
	public void setStatus(String status) {
		Status = status;
	}
	public void setMtime(String mtime) {
		Mtime = mtime;
	}
	public String getQryOrderby() {
		return QryOrderby;
	}
	public void setQryOrderby(String qryOrderby) {
		QryOrderby = qryOrderby;
	}


	
}